# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.930.107.14 -> 1.930.107.15 # include/linux/hugetlb.h 1.1 -> 1.2 # Documentation/vm/hugetlbpage.txt 1.1 -> 1.2 # fs/hugetlbfs/inode.c 1.2 -> 1.3 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/17 jgarzik@redhat.com 1.930.162.35 # Merge redhat.com:/garz/repo/marcelo-2.4 # into redhat.com:/garz/repo/net-drivers-2.4 # -------------------------------------------- # 03/06/17 bjorn_helgaas@hp.com 1.930.1.209 # Merge hp.com:/home/helgaas/bk/ia64-extras # into hp.com:/home/helgaas/bk/linux-ia64-2.4 # -------------------------------------------- # 03/06/17 bjorn_helgaas@hp.com 1.930.1.210 # Merge hp.com:/home/helgaas/bk/to-marcelo-2.4 # into hp.com:/home/helgaas/bk/linux-ia64-2.4 # -------------------------------------------- # 03/06/17 marcelo@freak.distro.conectiva 1.930.164.8 # Changed VERSION to .22 # -------------------------------------------- # 03/06/17 davem@nuts.ninka.net 1.930.170.1 # Merge. # -------------------------------------------- # 03/06/17 davem@nuts.ninka.net 1.930.108.29 # Merge nuts.ninka.net:/home/davem/src/BK/net-2.4.22 # into nuts.ninka.net:/home/davem/src/BK/net-2.4 # -------------------------------------------- # 03/06/17 agrover@groveronline.com 1.994 # ACPI: acpiphp update (Takayoshi Kochi) # -------------------------------------------- # 03/06/17 davem@nuts.ninka.net 1.930.108.30 # [IPV6]: Fix igmp6_timer_handler forward declaration. # -------------------------------------------- # 03/06/18 jfs.adm@hostme.bitkeeper.com 1.930.163.5 # Merge bk://linux.bkbits.net/linux-2.4 # into hostme.bitkeeper.com:/ua/repos/j/jfs/linux-2.4 # -------------------------------------------- # 03/06/18 trini@kernel.crashing.org 1.930.164.9 # Merge kernel.crashing.org:/home/trini/work/kernel/pristine/linux-2.4-misc # into kernel.crashing.org:/home/trini/work/kernel/pristine/for-marcelo-ppc # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.1 # [PATCH] Handle concurrent failure of two drives in raid5 # # ### Comments for ChangeSet # # If two drives both fail during a write request, raid5 doesn't # cope properly and will eventually oops. # # With this patch, blocks that have already been 'written' # are failed when double drive failure is noticed, as well as # blocks that are about to be written. # # ----------- Diffstat output ------------ # ./drivers/md/raid5.c | 10 +++++++++- # 1 files changed, 9 insertions(+), 1 deletion(-) # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.2 # [PATCH] Fix bug in /proc/mdstat # # [These 3 patches for 2.4.22-pre - thanks] # # If /proc/mdstat is large, or reads are for a small size, # then the last line of /proc/mdstat is repeated nearly 65536 times. # # This patch will fix it. # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.3 # [PATCH] Fix the check for execute permissions of parent directories in NFSd # # [4 patches for nfsd in 2.4.22-pre] # # The previous check fails on directories with uid=0, gid=0, and # permissions in ACLs. A similar check to this one is also found in # the 2.5 kernel in fs/nfsd/nfsfh.c:nfsd_acceptable(). # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.1 # [PATCH] USB: Backport of USB speedtouch driver to 2.4 # # Since the 2.5 crc library hasn't been backported # to the 2.4 tree yet, I included a crc routine in # the speedcrc files. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.2 # [PATCH] USB speedtouch: move MOD_INC_USE_COUNT # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.3 # [PATCH] USB speedtouch: discard packets for non-existant vcc's # # I broke part of the udsl_decode_rawcell logic in a previous patch, leading to # possible hangs on startup/shutdown. # Thanks to Subodh Srivastava and Ted Phelps for their bug reports. # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.4 # [PATCH] kNFSd: SVC sockets don't disable Nagle # # I noticed that the Nagle algorithm was disabled just recently on the # client side, while it still seems to be enabled on the server side. The # previous patch came from Chuck Lever. # # Below patch disables it on the server side as well. For latency reasons, # this should be the desired behaviour NFS at both client and server. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.4 # [PATCH] USB speedtouch: bump the version number # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.5 # [PATCH] USB speedtouch: crc optimization # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.6 # [PATCH] USB speedtouch: compile fix # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.7 # [PATCH] USB speedtouch: remove trailing semicolon # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.8 # [PATCH] USB speedtouch: trivial whitespace and name changes # # No code changes. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.9 # [PATCH] USB speedtouch: add missing #include # # Backport from 2.5. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.10 # [PATCH] USB speedtouch: replace yield() # # Use set_current_state (TASK_RUNNING); schedule(); instead. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.11 # [PATCH] USB speedtouch: add defensive memory barriers # # Defend against future maintainers. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.12 # [PATCH] USB speedtouch: spin_lock_irqsave -> spin_lock_irq in process context # # Replace spin_lock_irqsave/spin_unlock_irqrestore with # spin_lock_irq/spin_unlock_irq in routines that are only # called in process context. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.13 # [PATCH] USB speedtouch: spin_lock_irqsave -> spin_lock_irq in tasklets # # Replace spin_lock_irqsave/spin_unlock_irqrestore with # spin_lock_irq/spin_unlock_irq in tasklet actions, since # these are always called with local irqs enabled. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.14 # [PATCH] USB speedtouch: verbose debugging # # Add a vdbg macro for verbose debugging, and convert some # noisy debugging statements to use it. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.15 # [PATCH] USB speedtouch: use optimally sized reconstruction buffers # # Calculate the maximum size needed for the SAR # reconstruction buffer from the supplied qos parameters. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.16 # [PATCH] USB speedtouch: send path micro optimizations # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.17 # [PATCH] USB speedtouch: kfree_skb -> dev_kfree_skb # # Always use dev_kfree_skb. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.18 # [PATCH] USB speedtouch: remove useless NULL pointer checks # # The stats field is never NULL. # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.5 # [PATCH] kNFSd: TCP nfsd connection hangs when partial record header is received # # From: Olof Johansson # # Below patch resolves a hang where a TCP nfsd connection will hang even # though new data is received on the socket. We've seen this a few times in # our lab, but it usually happened every few weeks. # # If a short record header is received, the SK_BUSY flag is never cleared, # and even though new data arrives, it will not be handled. This in turn # leads to hangs of particular clients (while others will continue to work # without problem). # # I also changed the return code for that condition to be the same as for a # (regular) short read. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.19 # [PATCH] USB speedtouch: receive path micro optimization # # Make the most discriminating comparison first. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.20 # [PATCH] USB speedtouch: receive code rewrite # # Main points: # - receive buffers are decoupled from urbs, so an urb can be # resubmitted with a new buffer before the old buffer is processed. # - the packet reconstruction code is much simpler. # - locking is simplified by the fact that only the tasklet launches # receive urbs # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.21 # [PATCH] USB speedtouch: remove MOD_XXX_USE_COUNT # # The ATM layer takes a reference with fops_get. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.22 # [PATCH] USB speedtouch: set owner fields # # I think I'd better work on my plausible deniability... # -------------------------------------------- # 03/06/18 neilb@cse.unsw.edu.au 1.930.171.6 # [PATCH] kNFSd: Make sure an early close on a nfs/tcp connection is handled properly. # # From: Hirokazu Takahashi # # In svc_tcp_listen_data_ready we should be waiting for # TCP_LISTEN, not TCP_ESTABLISHED. The later only worked # by accident. # Also, if a socket is closed as soon as we accept it, we # must shut it down straight away as we will never get a 'close' # event. # -------------------------------------------- # 03/06/18 linux-usb@gemeinhardt.info 1.930.172.23 # [PATCH] USB: add support for Mello MP3 Player # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.24 # [PATCH] USB: added support for Sony DSC-P8 # # Thanks to David Kimdon for the information. # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.25 # [PATCH] USB: attempt to track down pl2303 oopses on close... # # This doesn't solve it, but it's the proper thing to do right now. # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.26 # [PATCH] USB: add comment to storage/unusual_devs.h that specifies how to add new entries. # -------------------------------------------- # 03/06/18 James@superbug.demon.co.uk 1.930.172.27 # [PATCH] USB: Add support for Pentax Still Camera to linux kernel # -------------------------------------------- # 03/06/18 ccheney@cheney.cx 1.930.172.28 # [PATCH] USB: vicam.c copyright patches # # Here are two vicam.c patches to clean up and restore copyright notices # for 2.4.21-rc1 and 2.5.68-bk9. At some point in time Pavel and my # copyrights were remove inadvertenly from the code. # -------------------------------------------- # 03/06/18 per.winkvist@telia.com 1.930.172.29 # [PATCH] USB: more unusual_devs.h changes # # I've modified James Courtier-Dutton description from Optio 430 => Optio # 2/3/400 since it applies to Optio 330 and possible 230 too. # # Attached are the patch that was tried with Pentax Optio S and Optio 330 RS. # I've talked to Pete Zaitcev and he said I should be using CB instead since # more devices liked that better... so I leave that to you! # -------------------------------------------- # 03/06/18 david-b@pacbell.net 1.930.172.30 # [PATCH] USB: ehci i/o watchdog # # This patch adds a new "I/O watchdog" role to the existing # timer code, and cleans it up a bit. If you want to run # EHCI without IRQs, it's now simple: disable them, and # tweak the timer appropriately. # # The patch should help with these reported problems. # # (a) Bulk I/O sometimes seems to stop progressing. Not # trouble in itself, but usb-storage and scsi could # wedge deeply because of bugs in their fault recovery; # and then the problems could break khubd and rmmod... # # (b) Some periodic transfers need to be "jumpstarted". # Usually seen with a high speed hub. # -------------------------------------------- # 03/06/18 geert@linux-m68k.org 1.930.172.31 # [PATCH] USB: Big endian RTL8150 # # The RTL8150 USB Ethernet driver doesn't work on big endian machines. Here are # patches (for both 2.4.x and 2.5.x) to fix that. The fix was tested on the # 2.4.20 and 2.4.21-rc1 version of the driver on big endian MIPS. # # Changes: # - Fix endianness of rx_creg (from Dimitri Torfs ) # - Kill unused last parameter of async_set_registers() # -------------------------------------------- # 03/06/18 philipp@void.at 1.930.172.32 # [PATCH] USB: unusual_devs.h patch # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.173.1 # Merge samba.org:/stuff/paulus/kernel/linux-2.4 # into samba.org:/stuff/paulus/kernel/for-marcelo-ppc # -------------------------------------------- # 03/06/18 nicolas@dupeux.net 1.930.172.33 # [PATCH] USB: UNUSUAL_DEV for aiptek pocketcam # # Here is the unusual_dev entry i'm using to get my digital camera. # # # diff -cr linux/drivers/usb/storage/unusual_devs.h linux_vaxvms/drivers/usb/storage/unusual_devs.h # *** linux/drivers/usb/storage/unusual_devs.h 2003-03-14 21:32:46.000000000 +0100 # -------------------------------------------- # 03/06/18 david-b@pacbell.net 1.930.172.34 # [PATCH] USB: SMP ehci-q.c 1010 BUG() # # Stefano Barbato wrote: # > Dual PIII # > kernel 2.4.21-rc2 (w/ SMP) (2.5.69 below) # > ... # > # > I put a few printk before the BUG() and I found that the offending if() is # > this: # > if(qh->qh_state != QH_STATE_LINKED # > && qh->qh_state != QH_STATE_UNLINK_WAIT) # > # > because qh_state were QH_STATE_COMPLETING. # # I got a similar SMP report recently, but without info about # which clause was failing -- which is a key clue, thanks!! # # The COMPLETING state is used only while a QH is being # scanned for completed TDs. (Think CPU-0 irq handler.) # Looking at the handful of places that call the routine # reporting the BUG(), a couple seem like they could make # trouble with multiple CPUs in the driver. # -------------------------------------------- # 03/06/18 smb@smbnet.de 1.930.172.35 # [PATCH] USB: another usb storage addition # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.36 # [PATCH] USB: fix break control for pl2303 driver # # Thanks to Martin Evans for pointing this out. # -------------------------------------------- # 03/06/18 bcollins@debian.org 1.930.172.37 # [PATCH] USB: Happ UGCI added as BADPAD for workaround # # Greg, I sent these patches to Vojtech, and haven't heard anything back, # but they are straight forward. One simply backports the BADPAD handling # to 2.4, and both patches add Happ UGCI joysticks under the BADPAD # workaround. # -------------------------------------------- # 03/06/18 Richard.Curnow@superh.com 1.930.172.38 # [PATCH] USB: ehci-hcd.c needs to include # # When I try to configure in EHCI support without this patch, I get # generic_ffs undefined at link time. (This is with 2.4.21-rc2 on our # sh64 (SH-5) port). Perhaps there are other ways to achieve this, but # this worked for me. # -------------------------------------------- # 03/06/18 Walter.Harms@Informatik.Uni-Oldenburg.DE 1.930.172.39 # [PATCH] USB: fixes kernel_thread # -------------------------------------------- # 03/06/18 Walter.Harms@Informatik.Uni-Oldenburg.DE 1.930.172.40 # [PATCH] USB: fixes kernel_thread # -------------------------------------------- # 03/06/18 vojtech@suse.cz 1.930.172.41 # [PATCH] USB: Make Olympus cameras work with usb-storage # # According to Jan Derfinak, Olympus USB cameras mistakenly report an # 'USBU' signature instead of 'USBS', while using the normal USB Storage # protocol. # -------------------------------------------- # 03/06/18 per.winkvist@telia.com 1.930.172.42 # [PATCH] Re: unusual_devs.h patch that was in 2.5.68 # # On Friday 02 May 2003 09:03, Greg KH wrote: # > On Thu, May 01, 2003 at 11:15:32AM +0200, Per Winkvist wrote: # > > I've modified James Courtier-Dutton description from Optio 430 => Optio # > > 2/3/400 since it applies to Optio 330 and possible 230 too. # > > # > > Attached are the patch that was tried with Pentax Optio S and Optio 330 # > > RS. I've talked to Pete Zaitcev and he said I should be using CB instead # > > since more devices liked that better... so I leave that to you! # > > # > > Thanks a lot and I hope this will end up in 2.4 sooon :=) # > # > I've applied these to my 2.4 and 2.5 trees. The 2.4 ones will have to # > wait until after 2.4.21 comes out. The 2.5 one will go out with my next # > round of 2.5 usb patches, probably in a few days. # # Hmm... # # The unusual patch for Pentax Optio S (and description fix for Pentax 2/3/400) # I sent to you was against 2.4.20, not against your bk usb repository. This # caused Pentax entries to get duplicated for 2.4 and 2.5 (bk current too). # Then another Pentax Optio S patch have been applied as well... # # Right now you have three 0x0004 and two 0x0006 entries ;=) # -------------------------------------------- # 03/06/18 wahrenbruch@kobil.de 1.930.172.43 # [PATCH] USB: kobil_sct.c added support for KAAN SIM Reader # # here is a patch for the kobil_sct.c usb-serial driver which # adds support for the KAAN SIM. # -------------------------------------------- # 03/06/18 bcollins@debian.org 1.930.172.44 # [PATCH] USB Multi-input quirk # -------------------------------------------- # 03/06/18 hwahl@hwahl.de 1.930.172.45 # [PATCH] USB: Patch for Samsung Digimax 410 # # *** a/drivers/usb/storage/unusual_devs.h 2003-05-22 20:54:26.000000000 +0200 # -------------------------------------------- # 03/06/18 petkan@users.sourceforge.net 1.930.172.46 # [PATCH] USB: pegasus patch # # better EPIPE handling, ethtool improvements, and # another attempt to fix HOME_PNA support was made. # HP added as a vendor and device ID. # -------------------------------------------- # 03/06/18 bcollins@debian.org 1.930.172.47 # [PATCH] USB: fix keyboard leds # -------------------------------------------- # 03/06/18 stewart@inverse.wetlogic.net 1.930.172.48 # [PATCH] USB: HIDDev uref backport for 2.4? # -------------------------------------------- # 03/06/18 olh@suse.de 1.930.172.49 # [PATCH] USB: incorrect ethtool -i driver name # # ethtool -i ethX should return the driver name instead of a 'verbose' # string. Other tools rely on the output. # 2.5 might need a similar fix. # # smirnow:~ # ethtool -i eth0 # driver: 3c59x # version: LK1.1.16 # firmware-version: # bus-info: 00:0a.0 # smirnow:~ # ethtool -i eth1 # driver: Pegasus/Pegasus II USB Ethernet v0.4.30 (2003/04/01) # version: v0.4.30 (2003/04/01) # firmware-version: # bus-info: usb1:8 # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.50 # [PATCH] USB: pegasus ethtool fixup. # -------------------------------------------- # 03/06/18 johannes@erdfelt.com 1.930.172.51 # [PATCH] USB: fix 2.4 usbdevfs race # # Here's a patch to fix a race condition in usbdevfs. The fix is in hub.c # but the race is related to usbdevfs. # # The race goes like this: # # Process 1 (khubd) Process 2 (mount) # usb_hub_port_connect_change() # hub->children[port] = dev # usb_new_device() # usbdevfs_read_super() # recurse_new_dev_inode() # new_dev_inode() # list_add_tail(..., &dev->inodes) # usbdevfs_add_device() # new_dev_inode() # list_add_tail(..., &dev->inodes) # # The problem is that the inode gets added twice, corrupting dev->inodes. # This will cause a problems at disconnect where the same inode will be # freed twice, causing a neverending loop, or an oops. I think it will # also cause problems at unmount. # # The fix is to just move setting hub->children to later in the # enumeration process. This way usbdevfs_read_super won't see the device # before it has been through the usbdevfs_add_device path. # # I didn't see this on x86, but apparentely others have looking at the # RedHat 9 kernel sources. (RedHat bugzilla #81091) # # Pete, could you give this patch a shot for the problem you found in that # bug? I'm pretty sure they are the same problem. # -------------------------------------------- # 03/06/18 olh@suse.de 1.930.172.52 # [PATCH] USB: incorrect ethtool -i driver name # # This converts 2.4 to use driver_name # -------------------------------------------- # 03/06/18 bcollins@debian.org 1.930.172.53 # [PATCH] USB: Actually Fix 2.4 HID input # # Slight typo on my part for the 2.4 fix (no keyboard LEDs). # -------------------------------------------- # 03/06/18 vsu@altlinux.ru 1.930.172.54 # [PATCH] USB: HIDDEV / UPS patches # -------------------------------------------- # 03/06/18 hanno@gmx.de 1.930.172.55 # [PATCH] USB: Patch for Vivicam 355 # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.56 # [PATCH] USB: add error reporting functionality to the pl2303 driver. # -------------------------------------------- # 03/06/18 bwheadley@earthlink.net 1.930.172.57 # [PATCH] USB: Aiptek kernel driver 1.0 for Kernel 2.4 # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.58 # [PATCH] USB: fixup aiptek driver for older compilers # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.172.59 # USB: clean up extra whitespace in visor.c driver. # -------------------------------------------- # 03/06/18 pdelaney@lsil.com 1.930.171.7 # [PATCH] Critical bug fix for fusion driver # # Hello Marcelo, Alan - # # In our IA64 testing we have discovered a bug that causes a # critical failure with the fusion driver. To date we have been unable to # reproduce the failure on 32 bit systems, but given the fix, the failure # could # occur on any architecture.  Please accept the attached patch for # 2.4.21-rc9. # # Changes: # o critical bug fix: 2 line patch to zero unused CDB bytes in driver qcmd # function # o use old eh code instead of new # o change mailto labels to lstephen. # -------------------------------------------- # 03/06/18 baldrick@wanadoo.fr 1.930.172.60 # [PATCH] USB speedtouch: parametrize the module # -------------------------------------------- # 03/06/18 vojtech@suse.cz 1.930.172.61 # [PATCH] USB: Fix HID logical min/max for 2.4 # # Some UPSes have logical minimum and maximum value in HID descriptors the # same. The HID driver rejects such devices. This patch fixes this. Please # apply for 2.4, I'll take care of a 2.5 patch. # -------------------------------------------- # 03/06/18 henning@meier-geinitz.de 1.930.172.62 # [PATCH] USB: New vendor/product ids for scanner driver # # This patch adds some new vendor/product ids for the USB scanner # driver. # # It's the same that already went into 2.5. # -------------------------------------------- # 03/06/18 dhollis@davehollis.com 1.930.172.63 # [PATCH] USB: AX8817X Driver for 2.4 Kernels # -------------------------------------------- # 03/06/18 stern@rowland.harvard.edu 1.930.172.64 # [PATCH] USB: US_SC_DEVICE and US_PR_DEVICE for 2.4 # # This patch implements the new subclass and protocol unusual_devs.h codes # for 2.4.21. Now new entries can remain consistent between 2.4 and 2.5. # -------------------------------------------- # 03/06/18 greg@kroah.com 1.930.171.8 # Merge kroah.com:/home/greg/linux/BK/bleed-2.4 # into kroah.com:/home/greg/linux/BK/gregkh-2.4 # -------------------------------------------- # 03/06/18 dlstevens@us.ibm.com 1.930.108.31 # [IPV4/IPV6]: Fix IGMP device refcount leaks, with help from yoshfuji@linux-ipv6.org. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.10 # Merge bk://ppc@ppc.bkbits.net/for-marcelo-ppc # into samba.org:/home/paulus/kernel/for-marcelo-ppc # -------------------------------------------- # 03/06/18 davem@nuts.ninka.net 1.930.108.32 # Merge nuts.ninka.net:/home/davem/src/BK/network-2.4 # into nuts.ninka.net:/home/davem/src/BK/net-2.4 # -------------------------------------------- # 03/06/18 davem@nuts.ninka.net 1.930.108.33 # [NET]: Fix build failure from recent sunrpc changes. # -------------------------------------------- # 03/06/18 davem@nuts.ninka.net 1.930.174.1 # Merge nuts.ninka.net:/home/davem/src/BK/sparcwork-2.4 # into nuts.ninka.net:/home/davem/src/BK/sparc-2.4 # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.11 # PPC32: Update for PPC 4xx TLB and exception handling. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.12 # PPC32: Add a new framework for on-chip peripherals for the IBM 4xx # embedded processors. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.13 # PPC32: Introduce a new config symbol, CONFIG_40x, used for PPC 40x cpus. # # This allows us to distinguish code which is appropriate for all 4xx # cpus from code that applies to the 403 and 405 but not to the 440. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.14 # PPC32: Add generic IBM PPC405GP support and use it on the walnut platform. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.15 # PPC32: Update the support for the "Walnut" 405GP platform. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.16 # PPC32: Make debug exceptions usable on 4xx-class processors, and improve # trap handling. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.17 # PPC32: Add support for PPC 405GP interrupt controller. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.18 # PPC32: Extra register and other definitions for the PPC 405GP processor. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.19 # PPC32: Move PC-style serial port definitions out to asm/pc_serial.h. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.20 # PPC32: remove ppc4xx_serial.h, it is no longer used. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.21 # PPC32: Cleanups for PPC 405GP-based systems; add file of OCP ids. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.22 # PPC32: Don't run `checks' program on make zImage. # # The program itself is a bit problematical since it relies on including both # kernel and system headers, and it hasn't found any problems for ages. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.23 # PPC32: Add definitions for the UIC interrupt controller on the 405GP processor. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.24 # PPC32: Add support for PCI and time-of-day clock on 405GP-based systems. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.25 # PPC32: Allow for PCI host bridges that need explicit type 1 cycle indication. # -------------------------------------------- # 03/06/19 paulus@samba.org 1.930.164.26 # Merge samba.org:/stuff/paulus/kernel/linux-2.4 # into samba.org:/stuff/paulus/kernel/for-marcelo-ppc # -------------------------------------------- # 03/06/19 trini@kernel.crashing.org 1.930.164.27 # PPC32: Describe when we want to do a CPM reset on MPC8xx. # From Dan Malek . # -------------------------------------------- # 03/06/19 bjorn_helgaas@hp.com 1.930.161.10 # ia64: Rename EFI systab tags (no spaces, etc, for easier parsing). # -------------------------------------------- # 03/06/19 rohit.seth@intel.com 1.930.107.15 # HUGETLB: Add uid, gid, mode, size and nr_inodes mount support and file attributes. # # Please find attached an update to the hugetlb page patch for your # 2.4.21 bk tree. This patch incorporates the support for uid, gid, # mode, size and nr_inodes on the mount command line for hugetlb # filesystems. It also incorporates the support of setting the correct # attributes to files in hugetlbfs. # # # Most part of this code is already in Linus' bk tree for 2.5.71. The # remaining part (incorporating size option should also get in soon). # -------------------------------------------- # diff -Nru a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt --- a/Documentation/vm/hugetlbpage.txt Wed Oct 8 09:09:56 2003 +++ b/Documentation/vm/hugetlbpage.txt Wed Oct 8 09:09:56 2003 @@ -67,14 +67,28 @@ call, then it is required that system administrator mount a file system of type hugetlbfs: - mount none /mnt/huge -t hugetlbfs + mount none /mnt/huge -t hugetlbfs + This command mounts a (pseudo) filesystem of type hugetlbfs on the directory -/mnt/huge. Any files created on /mnt/huge uses hugepages. An example is -given at the end of this document. +/mnt/huge. Any files created on /mnt/huge use hugepages. The uid and gid +options set the owner and group of the root of the file system. By default +the uid and gid of the current process are taken. The mode option sets the +mode of root of file system to value & 0777. This value is given in octal. +By default the value 0755 is picked. The size option sets the maximum value of +memory (huge pages) allowed for that filesystem (/mnt/huge). The size is +rounded down to HPAGE_SIZE. The option nr_inode sets the maximum number of +inodes that /mnt/huge can use. If the size or nr_inode options are not +provided on command line then no limits are set. For option size and option +nr_inodes, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For +example, size=2K has the same meaning as size=2048. An example is given at +the end of this document. read and write system calls are not supported on files that reside on hugetlb file systems. + +Regular chown, chgrp and chmod commands can be used to change the file +attributes on hugetlbfs. Also, it is important to note that no such mount command is required if the applications are going to use only shmat/shmget system calls. It is possible diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c --- a/fs/hugetlbfs/inode.c Wed Oct 8 09:09:56 2003 +++ b/fs/hugetlbfs/inode.c Wed Oct 8 09:09:56 2003 @@ -22,6 +22,8 @@ #include #include +#include +#include extern struct list_head inode_unused; @@ -62,9 +64,19 @@ } static int hugetlbfs_statfs(struct super_block *sb, struct statfs *buf) { + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(sb); + + if (sbinfo) { + spin_lock(&sbinfo->stat_lock); + buf->f_blocks = sbinfo->max_blocks; + buf->f_bavail = buf->f_bfree = sbinfo->free_blocks; + buf->f_files = sbinfo->max_inodes; + buf->f_ffree = sbinfo->free_inodes; + spin_unlock(&sbinfo->stat_lock); + } buf->f_type = HUGETLBFS_MAGIC; - buf->f_bsize = PAGE_CACHE_SIZE; - buf->f_namelen = 255; + buf->f_bsize = HPAGE_SIZE; + buf->f_namelen = NAME_MAX; return 0; } @@ -78,14 +90,23 @@ inode->i_nlink--; dput(new_dentry); } + old_dir->i_size -= PSEUDO_DIRENT_SIZE; + new_dir->i_size += PSEUDO_DIRENT_SIZE; + old_dir->i_ctime = old_dir->i_mtime = + new_dir->i_ctime = new_dir->i_mtime = + inode->i_ctime = CURRENT_TIME; error = 0; } return error; } static int hugetlbfs_unlink(struct inode *dir, struct dentry *dentry) { + struct inode *inode = dentry->d_inode; + if (!hugetlbfs_empty(dentry)) return -ENOTEMPTY; + dir->i_size -= PSEUDO_DIRENT_SIZE; + inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; dentry->d_inode->i_nlink--; dput (dentry); return 0; @@ -98,6 +119,8 @@ struct inode *inode = old_dentry->d_inode; if (S_ISDIR(inode->i_mode)) return -EPERM; + dir->i_size += PSEUDO_DIRENT_SIZE; + inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; inode->i_nlink++; atomic_inc(&inode->i_count); dget(dentry); @@ -113,8 +136,9 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) { - struct inode *inode =file->f_dentry->d_inode; + struct inode *inode = file->f_dentry->d_inode; struct address_space *mapping = inode->i_mapping; + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(inode->i_sb); loff_t len; int ret; @@ -130,6 +154,18 @@ if (vma->vm_start < (REGION_HPAGE << REGION_SHIFT)) return -EINVAL; #endif + len = (loff_t)(vma->vm_end - vma->vm_start); + if (sbinfo->free_blocks >= 0) { /* Check if there is any size limit. */ + spin_lock(&sbinfo->stat_lock); + if ((len >> HPAGE_SHIFT) <= sbinfo->free_blocks) { + sbinfo->free_blocks -= (len >> HPAGE_SHIFT); + spin_unlock(&sbinfo->stat_lock); + } else { + spin_unlock(&sbinfo->stat_lock); + return -ENOMEM; + } + } + down(&inode->i_sem); UPDATE_ATIME(inode); @@ -137,6 +173,14 @@ vma->vm_ops = &hugetlb_vm_ops; ret = hugetlb_prefault(mapping, vma); up(&inode->i_sem); + + /* If the huge page allocation has failed then increment the free_blocks. */ + if ((ret != 0) && (sbinfo->free_blocks >= 0)) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_blocks += (len >> HPAGE_SHIFT); + spin_unlock(&sbinfo->stat_lock); + } + return ret; } @@ -216,6 +260,7 @@ void truncate_hugepages(struct inode *inode, struct address_space *mapping, loff_t lstart) { + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(mapping->host->i_sb); unsigned long start = lstart >> HPAGE_SHIFT; unsigned long next; unsigned long max_idx; @@ -231,12 +276,19 @@ page_cache_release(page); truncate_huge_page(mapping, page); unlock_page(page); + if (sbinfo->free_blocks >= 0) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_blocks ++; + spin_unlock(&sbinfo->stat_lock); + } } } static void hugetlbfs_delete_inode(struct inode *inode) { + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(inode->i_sb); + list_del_init(&inode->i_hash); list_del_init(&inode->i_list); inode->i_state |= I_FREEING; @@ -244,12 +296,18 @@ if (inode->i_data.nrpages) truncate_hugepages(inode, &inode->i_data, 0); + if (sbinfo->free_inodes >= 0) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_inodes++; + spin_unlock(&sbinfo->stat_lock); + } } static void hugetlbfs_forget_inode(struct inode *inode) { struct super_block *super_block = inode->i_sb; + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(super_block); if (list_empty(&inode->i_hash)) goto out_truncate; @@ -272,6 +330,12 @@ inodes_stat.nr_inodes--; if (inode->i_data.nrpages) truncate_hugepages(inode, &inode->i_data, 0); + + if (sbinfo->free_inodes >= 0) { + spin_lock(&sbinfo->stat_lock); + sbinfo->free_inodes++; + spin_unlock(&sbinfo->stat_lock); + } } static void hugetlbfs_drop_inode(struct inode *inode) @@ -352,7 +416,6 @@ struct inode *inode = dentry->d_inode; int error; unsigned int ia_valid = attr->ia_valid; - unsigned long dn_mask; BUG_ON(!inode); @@ -372,29 +435,34 @@ if (error) goto out; attr->ia_valid &= ~ATTR_SIZE; - error = inode_setattr(inode, attr); } -#if 0 - if (error) - goto out; - dn_mask = setattr_mask(ia_valid); - if (dn_mask) - dnotify_parent(dentry, dn_mask); -#endif + error = inode_setattr(inode, attr); out: return error; } -static struct inode *hugetlbfs_get_inode(struct super_block *sb, - int mode, int dev) +static struct inode *hugetlbfs_get_inode(struct super_block *sb, uid_t uid, + gid_t gid, int mode, int dev) { - struct inode * inode = new_inode(sb); + struct inode *inode; + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(sb); + if (sbinfo->free_inodes >= 0) { + spin_lock(&sbinfo->stat_lock); + if (!sbinfo->free_inodes) { + spin_unlock(&sbinfo->stat_lock); + return NULL; + } + sbinfo->free_inodes--; + spin_unlock(&sbinfo->stat_lock); + } + + inode = new_inode(sb); if (inode) { inode->i_mode = mode; - inode->i_uid = current->fsuid; - inode->i_gid = current->fsgid; - inode->i_blksize = PAGE_CACHE_SIZE; + inode->i_uid = uid; + inode->i_gid = gid; + inode->i_blksize = HPAGE_SIZE; inode->i_blocks = 0; inode->i_rdev = NODEV; inode->i_mapping->a_ops = &hugetlbfs_aops; @@ -427,10 +495,13 @@ static int hugetlbfs_mknod(struct inode *dir, struct dentry *dentry, int mode, int dev) { - struct inode * inode = hugetlbfs_get_inode(dir->i_sb, mode, dev); + struct inode *inode = hugetlbfs_get_inode(dir->i_sb, current->fsuid, + current->fsgid, mode, dev); int error = -ENOSPC; if (inode) { + dir->i_size += PSEUDO_DIRENT_SIZE; + dir->i_ctime = dir->i_mtime = CURRENT_TIME; d_instantiate(dentry, inode); dget(dentry); /* Extra count - pin the dentry in core */ error = 0; @@ -500,17 +571,85 @@ .put_inode = hugetlbfs_drop_inode, }; +static int hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) +{ + char *opt, *value, *rest; + + if (!options) + return 0; + while ((opt = strsep(&options, ",")) != NULL) { + if (!*opt) + continue; + + value = strchr(opt, '='); + if (!value || !*value) + return -EINVAL; + else + *value++ = '\0'; + + if (!strcmp(opt, "uid")) + pconfig->uid = simple_strtoul(value, &value, 0); + else if (!strcmp(opt, "gid")) + pconfig->gid = simple_strtoul(value, &value, 0); + else if (!strcmp(opt, "mode")) + pconfig->mode = simple_strtoul(value, &value, 0) & 0777U; + else if (!strcmp(opt, "size")) { + unsigned long long size = memparse(value, &rest); + if (*rest == '%') { + size <<= HPAGE_SHIFT; + size *= htlbpage_max; + do_div(size, 100); + rest++; + } + size &= HPAGE_MASK; + pconfig->nr_blocks = (size >> HPAGE_SHIFT) ; + value = rest; + } else if (!strcmp(opt,"nr_inodes")) { + pconfig->nr_inodes = memparse(value, &rest); + value = rest; + } else + return -EINVAL; + + if (*value) + return -EINVAL; + } + return 0; +} + static struct super_block * hugetlbfs_fill_super(struct super_block * sb, void * data, int silent) { struct inode * inode; struct dentry * root; + int ret; + struct hugetlbfs_config config; + struct hugetlbfs_sb_info *sbinfo; - sb->s_blocksize = PAGE_CACHE_SIZE; - sb->s_blocksize_bits = PAGE_CACHE_SHIFT; + sbinfo = kmalloc(sizeof(struct hugetlbfs_sb_info), GFP_KERNEL); + if (!sbinfo) + return -ENOMEM; + sb->u.generic_sbp = sbinfo; + + config.nr_blocks = -1; /* No limit on size by default. */ + config.nr_inodes = -1; /* No limit on number of inodes by default. */ + config.uid = current->fsuid; + config.gid = current->fsgid; + config.mode = 0755; + ret = hugetlbfs_parse_options(data, &config); + if (ret) + return ret; + + spin_lock_init(&sbinfo->stat_lock); + sbinfo->max_blocks = config.nr_blocks; + sbinfo->free_blocks = config.nr_blocks; + sbinfo->max_inodes = config.nr_inodes; + sbinfo->free_inodes = config.nr_inodes; + sb->s_blocksize = HPAGE_SIZE; + sb->s_blocksize_bits = HPAGE_SHIFT; sb->s_magic = HUGETLBFS_MAGIC; sb->s_op = &hugetlbfs_ops; - inode = hugetlbfs_get_inode(sb, S_IFDIR | 0755, 0); + inode = hugetlbfs_get_inode(sb, config.uid, config.gid, + S_IFDIR | config.mode, 0); if (!inode) return NULL; @@ -558,7 +697,8 @@ goto out_dentry; error = -ENOSPC; - inode = hugetlbfs_get_inode(root->d_sb, S_IFREG | S_IRWXUGO, 0); + inode = hugetlbfs_get_inode(root->d_sb, current->fsuid, + current->fsgid, S_IFREG | S_IRWXUGO, 0); if (!inode) goto out_file; diff -Nru a/include/linux/hugetlb.h b/include/linux/hugetlb.h --- a/include/linux/hugetlb.h Wed Oct 8 09:09:56 2003 +++ b/include/linux/hugetlb.h Wed Oct 8 09:09:56 2003 @@ -48,6 +48,29 @@ #endif /* !CONFIG_HUGETLB_PAGE */ #ifdef CONFIG_HUGETLBFS +struct hugetlbfs_config { + uid_t uid; + gid_t gid; + umode_t mode; + long nr_blocks; + long nr_inodes; +}; + +struct hugetlbfs_sb_info { + long max_blocks; /* How many blocks are allowed */ + long free_blocks; /* How many are left for allocation */ + long max_inodes; /* How many inodes are allowed */ + long free_inodes; /* How many are left for allocation */ + spinlock_t stat_lock; +}; + +static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) +{ + return sb->u.generic_sbp; +} + +#define PSEUDO_DIRENT_SIZE 20 + extern struct file_operations hugetlbfs_file_operations; extern struct vm_operations_struct hugetlb_vm_ops; struct file *hugetlb_zero_setup(size_t);